package com.bdqn.mapper;

import com.bdqn.pojo.SysRole;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.List;

public class SysRoleMapperImpl implements SysRoleMapper{
    private SqlSessionTemplate sqlSession;
    @Override
    public List<SysRole> list(String roleName) {
        return  this.getSqlSession().getMapper(SysRoleMapper.class).list(roleName);
    }

    @Override
    public int add(SysRole sysRole) {
        return  this.getSqlSession().getMapper(SysRoleMapper.class).add(sysRole);
    }

    public SqlSessionTemplate getSqlSession() {
        return sqlSession;
    }

    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }
}
